﻿@model mvcForum.Web.ViewModels.BoardViewModel
@using mvcForum.Web.Helpers
@{
	ViewBag.Title = ForumHelper.GetString("Board.Title", new { Name = Model.Name });

	Layout = Url.GetThemeBaseUrl() + "areas/forum/views/shared/forumlayout.cshtml";
}
<!-- Views/Forum/Index.cshtml -->
@Html.Partial("Breadcrumb", Model.Path)
	<span class="pull-right muted">@ForumHelper.GetString("CurrentTime", new object[] { DateTime.UtcNow })</span>

	<ul class="list-inline">
		<li>@Html.ActionLink(ForumHelper.GetLinkText("LinkText.UnansweredPosts"), "unanswered posts", "search", null, new { @class = "btn btn-info btn-sm" })</li>
@if (ForumHelper.Authenticated()) {
		<li>@Html.ActionLink(ForumHelper.GetLinkText("LinkText.MarkAsRead"), "Mark As Read", "home", new { id = Model.Id }, new { @class = "btn btn-info btn-sm" })</li>
}
	</ul>
	<table class="table">
@foreach (var category in Model.Categories) {
@Html.Partial("CategoryPartial", category)
}
	</table>
@if (Model.ShowOnline) {
	<dl>
		<dt>@ForumHelper.GetString("Board.OnlineUsers")</dt>
		<dd>@String.Join(", ", Model.OnlineUsers.Select(u => u.UseFullName ? u.FullName : u.Name))</dd>
	</dl>
}

@if (ForumHelper.Debug) {
<!-- For Selenium Test -->
<div id="forum_home_index" style="display: none;"></div>
}
@Html.Partial("Breadcrumb", Model.Path)
